<template>
  <div class="hot">
    <Carousel title="新碟首发" imgurl='item.cover' :data="data.arr" />
  </div>
</template>

<script>
import { getNewAlbum } from "@/api";
import { ref, reactive, onBeforeMount } from "vue";
import Carousel from "@/components/carousel-album";
export default {
  name: "Album",
  components: {
    Carousel,
  },
  setup() {
    let data = reactive({ arr: [] });
    let leng = ref(0);
    const currentDate = ref(new Date());
    onBeforeMount(async () => {
      await getNewAlbum().then((res) => {
        data.arr = res.data.data.list;
        console.log(data.arr);
      });
    });
    return { data, leng, currentDate };
  },
};
</script>

<style lang="less" scoped>
.hot {
  background: var(--color-background);
}
</style>
